#ifndef HUD_ITEM_AMBIENT_H
#define HUD_ITEM_AMBIENT_H

#include "consts.h"
#include "cash.h"

class HUD_ITEM_AMBIENT : public QObject, public QGraphicsItemGroup
{
    Q_OBJECT
    Q_PROPERTY(qreal transparent READ Transparent WRITE setTransparent)
private:
    GRAPHICS_PIXMAP_ITEM *item_black;
    GRAPHICS_PIXMAP_ITEM *item_blue;
    GRAPHICS_PIXMAP_ITEM *item_red;

//prop anims
    QPropertyAnimation *prop_anim_blue;
    QPropertyAnimation *prop_anim_red;
    QPropertyAnimation *prop_anim_black;

    CASH *cash;

public:
    HUD_ITEM_AMBIENT(CASH *cash);

    QPainterPath shape() const;
    QRectF boundingRect() const;

    void load();

    void damage();
    void shuttle_destroyed();

    void repair();

    ~HUD_ITEM_AMBIENT();

public slots:
    void standart();

private:
    qreal Transparent();
    void setTransparent(qreal value);

};

#endif // HUD_ITEM_AMBIENT_H
